<template>
	<view>
		<navigationBar title="商品管理">
		</navigationBar>
		<view class="flex-row">
			<view class="menu flex-row-center" @click="$navigateTo('/pages/goods/goods_info')">
				<image style="width: 100%;height: 100%;" src="/static/manage/manage_bg1.png"></image>
			</view>
			<view class="menu flex-row-center" @click="$navigateTo('/pages/goods/add_goods')">
				<image style="width: 100%;height: 100%;" src="/static/manage/manage_bg2.png"></image>
			</view>
		</view>
		<view class="t1">商品属性</view>
		<view style="flex: 1;">
			<view class="item flex-column" @click="$navigateTo('/pages/goods/classify_goods_sort')">
				<view class="t1">商品分类</view>
				<view class="t2">添加和管理商品分类</view>
				<image src="/static/arrow.png"></image>
			</view>
			<view class="item flex-column" @click="$navigateTo('/pages/goods/goods_unit')">
				<view class="t1">商品单位</view>
				<view class="t2">添加和管理商品单位 </view>
				<image src="/static/arrow.png"></image>
			</view>
			<view class="item flex-column" @click="$navigateTo('/pages/goods/goods_brand')">
				<view class="t1">商品品牌</view>
				<view class="t2">添加和管理商品品牌 </view>
				<image src="/static/arrow.png"></image>
			</view>
			<view class="item flex-column" @click="$navigateTo('/pages/goods/goods_label')">
				<view class="t1">商品标签</view>
				<view class="t2">添加和管理商品标签 </view>
				<image src="/static/arrow.png"></image>
			</view>
			<view class="item flex-column" @click="$navigateTo('/pages/goods/goods_supplier')">
				<view class="t1">供应商</view>
				<view class="t2">添加和管理商品供应商 </view>
				<image src="/static/arrow.png"></image>
			</view>
		</view>
	</view>
</template>

<script>
	import dsBridge from 'dsbridge'
	export default {
		data() {
			return {}
		},
		onLoad() {
			let token = dsBridge.call("getToken");
      console.log(token,'token');
			// uni.showToast({
			// 	title:"token:"+token,
			// 	icon:'none'
			// })
			if(token==undefined||token.length==0){
				this.$apiPost("/sso/operate/srvuser_login", [{
					serviceName: "srvuser_login",
					data: [{
						user_no: 15800003333,
						pwd: 'qwed23568&',
						
							// user_no: 13022805791,
							// pwd: 'lf123456789.',

						user_no: 'expls001',
						pwd: 'gmcc10086@',
						tenant:'86',
							
						"terminal_type":"android"
					}]
				}]).then(res => {
					let token = res.response[0].response.bx_auth_ticket;
					console.log(token)
					uni.setStorageSync("token", token)
				}) 
			}
			
		},
		methods: {

		}
	}
</script>

<style scoped lang="scss">
	.menu {
		margin-left: 22rpx;
		margin-top: 40rpx;
		width: 340rpx;
		height: 180rpx;
		background-size: 100% 100%;
	}

	.t1 {
		margin-left: 24rpx;
		margin-top: 34rpx;
		color: rgba(16, 16, 16, 1);
		font-size: 36rpx;
		font-weight: 500;
		margin-bottom: 34rpx;
	}

	.item {
		width: 702rpx;
		margin-left: 24rpx;
		border-radius: 12rpx;
		background-color: white;
		color: rgba(16, 16, 16, 1);
		margin-top: 28rpx;
		position: relative;

		.t1 {
			margin-top: 30rpx;
			margin-left: 24rpx;
			width: 151px;
			color: rgba(16, 16, 16, 1);
			font-size: 30rpx;
			font-weight: 700;
			margin-bottom: 0;
		}

		.t2 {
			margin-left: 24rpx;
			margin-top: 4rpx;
			color: rgba(153, 153, 153, 1);
			font-size: 24rpx;
			font-weight: 500;
			margin-bottom: 30rpx;
		}

		image {
			width: 40rpx;
			height: 40rpx;
			position: absolute;
			right: 72rpx;
			top: 50rpx;
		}
	}
</style>
